project(tshark LANGUAGES CXX)

# 递归查找当前目录及其子目录中的所有 .cpp 文件
file(GLOB_RECURSE SRCS "./*.cpp")

# 打印找到的所有文件
message(STATUS "Found source files: ${SRCS}")

# 遍历每个文件并打印
foreach(cpp_file IN LISTS SRCS)
    message(STATUS "Processing cpp_file: ${cpp_file}")
endforeach()

# file(GLOB SRCS "./*/*.cpp")
# message(STATUS ${SRCS})

# foreach(cpp_file IN LISTS SRCS)
#     message(STATUS "protocol add cpp_file: ${cpp_file}")
# endforeach()

add_library(tshark-static STATIC
    ${SRCS}
)

target_include_directories(tshark-static PUBLIC
    ${loguru_SOURCE_DIR}/
    ${tshark_SOURCE_DIR}/
    ${FMT_SOURCE_DIR}/include/
    ${jsoncpp_SOURCE_DIR}/include
    ${util_SOURCE_DIR}/
    ${3rd}/
    ${sql_SOURCE_DIR}/
)

target_link_libraries(tshark-static PUBLIC
    loguru-static
    fmt::fmt-header-only
    jsoncpp_static
    util-shared    
    sql
    controller
)
